﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<MvcApplication1.Services.get_dummy_userResult>>" %>

<table id="sqlInjectionResult">
<%  if (ViewData["model"] == "true" && ViewData["msg"] == "")
        {%>
    <tr>
        <th>ID</th>
        <th>Username</th>
        <th>Password</th>
    </tr>
    <%
        
            int count = 0;
            string cssClass = "Alt_Row_Color";
            foreach (var item in Model)
            {
                if (count % 2 == 1)
                    cssClass = "Row_Color";
                else
                    cssClass = "Alt_Row_Color";
         %>
         <tr>
            <td class="<%=cssClass %>">
                <%=Html.Encode(item.id)%>
            </td>
            <td class="<%=cssClass %>">
                <%=Html.Encode(item.username)%>
            </td>
            <td class="<%=cssClass %>">
                <%=Html.Encode(item.password)%>
            </td>
         </tr>
         <%
            count++;
            }
        }%>
</table>

<% if (ViewData["msg"] != "")
   {
       %>
       <p><%=ViewData["msg"] %></p>
       <%
   } %>